import {createApp} from 'vue'
import App from './App.vue'
const app = createApp(App);
import router from "@/router";
import store from "@/store";
import element from 'element-plus'
import I18n from "@/locale/index";
// import elementLocale from 'element-plus/lib/locale/lang/zh-cn'
import 'dayjs/locale/zh-cn'
import '@/permission'
import 'element-plus/lib/theme-chalk/index.css';
import {permiss, dragDialog} from '@/utils/directive'
import {hasPermission} from "@/utils/permiss";
import Table from '@/components/Table'
import Dialog from '@/components/Dialog'
// app.config.performance = true
app.config.globalProperties.$permiss = hasPermission
// 注册全局指令
app.directive('permiss', permiss)
app.directive('dragDialog', dragDialog)
app.component('Table', Table)
app.component('Dialog', Dialog)
app.use(element, {size: 'small',})
app.use(router)
app.use(store)
app.use(I18n)
app.mount('#app')
